/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Generation.GenerationDynamics.impl;

import EA_Model.IEC61970.Core.impl.PowerSystemResourceImpl;

import EA_Model.IEC61970.Generation.GenerationDynamics.GenerationDynamicsPackage;
import EA_Model.IEC61970.Generation.GenerationDynamics.SteamSupply;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Steam Supply</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link EA_Model.IEC61970.Generation.GenerationDynamics.impl.SteamSupplyImpl#getSteamSupplyRating <em>Steam Supply Rating</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class SteamSupplyImpl extends PowerSystemResourceImpl implements SteamSupply {
	/**
	 * The cached value of the '{@link #getSteamSupplyRating() <em>Steam Supply Rating</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getSteamSupplyRating()
	 * @generated
	 * @ordered
	 */
	protected EA_Model.IEC61970.Domain.Float steamSupplyRating;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected SteamSupplyImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return GenerationDynamicsPackage.Literals.STEAM_SUPPLY;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Float getSteamSupplyRating() {
		if (steamSupplyRating != null && steamSupplyRating.eIsProxy()) {
			InternalEObject oldSteamSupplyRating = (InternalEObject)steamSupplyRating;
			steamSupplyRating = (EA_Model.IEC61970.Domain.Float)eResolveProxy(oldSteamSupplyRating);
			if (steamSupplyRating != oldSteamSupplyRating) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, GenerationDynamicsPackage.STEAM_SUPPLY__STEAM_SUPPLY_RATING, oldSteamSupplyRating, steamSupplyRating));
			}
		}
		return steamSupplyRating;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EA_Model.IEC61970.Domain.Float basicGetSteamSupplyRating() {
		return steamSupplyRating;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setSteamSupplyRating(EA_Model.IEC61970.Domain.Float newSteamSupplyRating) {
		EA_Model.IEC61970.Domain.Float oldSteamSupplyRating = steamSupplyRating;
		steamSupplyRating = newSteamSupplyRating;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, GenerationDynamicsPackage.STEAM_SUPPLY__STEAM_SUPPLY_RATING, oldSteamSupplyRating, steamSupplyRating));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case GenerationDynamicsPackage.STEAM_SUPPLY__STEAM_SUPPLY_RATING:
				if (resolve) return getSteamSupplyRating();
				return basicGetSteamSupplyRating();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case GenerationDynamicsPackage.STEAM_SUPPLY__STEAM_SUPPLY_RATING:
				setSteamSupplyRating((EA_Model.IEC61970.Domain.Float)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case GenerationDynamicsPackage.STEAM_SUPPLY__STEAM_SUPPLY_RATING:
				setSteamSupplyRating((EA_Model.IEC61970.Domain.Float)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case GenerationDynamicsPackage.STEAM_SUPPLY__STEAM_SUPPLY_RATING:
				return steamSupplyRating != null;
		}
		return super.eIsSet(featureID);
	}

} //SteamSupplyImpl
